from django.urls import path
from rest_framework.routers import DefaultRouter
from rest_framework_simplejwt.views import TokenObtainPairView

from users.views import ImageVerifyView, UserViewSet, MyTokenObtainPairView, AreaViewSet, AddressViewSet

urlpatterns = [
    # 自己测试使用
    path('verification/', ImageVerifyView.as_view()),
    # 给客户端的api接口
    path('verification/<str:func>/<uuid:uuid>/', ImageVerifyView.as_view()),
    path('login/', MyTokenObtainPairView.as_view())
]
router = DefaultRouter()
router.register('users', UserViewSet)
router.register('area', AreaViewSet)
router.register('address', AddressViewSet)
urlpatterns += router.urls
